Repository navigation
Supervisor threads: dev links in the viewer, pins on the running app, the laptop relay (PR 3b) - #215
Merged
Merged
Conversation
… for the laptop's relay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s the box's gateway does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn Origin only A socket to a relay is taken on its own address alone (421 otherwise), from a page of its own origin under that name (403 for a missing or foreign Origin), origin-form only, and at most 32 at once per preview, released as each closes. The app sees localhost as Host and Origin; bytes go both ways raw, and every socket closes with the relay. Also from Task 2's review: the relay refuses another site's frame with 403, as the gateway does; previewStage says opened only to the ask that opened the relay; and DEVTEAM_RELAY_PORTS (low-high) moves the relays' range for tests, the refusal of new previews there moving with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…this laptop's relay Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ewer tab: Shift+click, pins on its routes, go Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tab; a question's [[name]] opens the viewer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fered it; the laptop's relay The lens-refusal note compares the blocked address's origin, not a prefix. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…h reload paths; who may frame the lens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment, and the pin through hot reload Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et goes to Vite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ay never serves a dashboard The page now stops at the top of its head when its parent is a page of its own origin (a preview's app or an artifact's page sent its frame here), so no poll or action runs under the owner's pointer. A relay is never opened for this dashboard's port or any port that answers a dashboard's hello, and a new registration refuses both. The relay gives up on an app that takes a WebSocket and sends no head (10 s), its divergences from the gateway are written down, and README, spec section 7, the ports layout comment and the stage flood asserts are corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e from another origin The two viewer subtests that framed the viewer under a page of its own origin now frame it from a stand-in hub (the dashboard's frame-ancestors name the hub's address), read through the frame's own script world, as the hub and the owner's wrapper frame it. The shipped page carries no seam. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd a relay closes when its target becomes a dashboard The relay sets x-devteam-relay on everything it forwards (a page's own copy replaced), and the dashboard answers 403 to any request that has it, before any route. The tick probes each open relay's target again. The own-dashboard check on registration also reads settings.md's dashboard_port, and the lens policy and the relaxed app policy name localhost for this dashboard as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Re-reviewed at 5c429ce. Each fix is in the code:
Kit tests on Node 24 pass locally, 82 of 82, and CI passes 9 of 9. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 3b, the last PR of supervisor threads. Spec:
docs/superpowers/specs/2026-11-10-supervisor-threads-design.md§7. Plan:docs/superpowers/plans/2026-11-11-supervisor-threads-previews.md. Follows #185 (threads), #194 (gateway) and #205 (artifact viewers).What the owner gets
[[name]]for a preview opens that tab too.supervisor.md§7).localhostas Host and Origin, and only answers its own Host.'self', the hub and this dashboard, including for apps that send no framing headers.x-devteam-relay: 1(a page's own copy replaced), and a dashboard answers 403 to any request with that header on every route, so owner actions cannot pass through it even if one appears on the target port later./api/view, never from opening a URL, and closes with its preview.frame-srcis computed per request from the live previews and relays. With none it stays exactly'self'.Trust boundary
goreaches only same-origin paths on the app (checked here and in the lens).Deliberate differences from the gateway (on loopback, where the dev server is reachable directly anyway): the relay forwards a non-GET with a foreign Origin and cross-site non-navigate fetches, passes
clear-site-data, and answers a down app with a plain 502. These are documented in the relay's header and the plan.How it was checked
test/dashboard.test.mjs139/139Notes
test/lib/ports.mjs(layout comment) andtest/lib/chrome.mjs(evIn, for cross-origin frames).🤖 Generated with Claude Code